package com.xgjweb.fsi.action;

import java.util.List;

import com.xgjweb.common.action.XgjWebAction;
import com.xgjweb.fsi.domain.Category;
import com.xgjweb.fsi.domain.Journal;
import com.xgjweb.fsi.domain.Revert;
import com.xgjweb.fsi.service.IJournalService;

/**
 * 
 * @author xgj
 * 
 */
public class JournalAction extends XgjWebAction {
	IJournalService journalService;

	public void setJournalService(IJournalService journalService) {
		this.journalService = journalService;
	}

	// 添加日志
	public Boolean addJournal(Journal journal) throws Exception {
		return journalService.addJournal(journal);
	}

	// 修改日志
	public Boolean updateJournal(Journal journal) throws Exception {
		return journalService.updateJournal(journal);
	}

	// 删除日志
	public Boolean deleteJournal(Journal journal) throws Exception {
		return journalService.deleteJournal(journal);
	}

	// 添加类别
	public Boolean addCategory(Category category) throws Exception {
		return journalService.addCategory(category);
	}

	// 更改类别
	public Boolean updateCategory(Category category) throws Exception {
		return journalService.updateCategory(category);
	}

	// 删除类别
	public Boolean deleteCategory(Category category) throws Exception {
		return journalService.deleteCategory(category);
	}

	// 查找类别
	public Category findCategory(Category category) throws Exception {
		return journalService.findCategory(category);
	}

	// 查看日志
	public Journal viewJournal(Journal journal) throws Exception {
		return journalService.viewJournal(journal);
	}

	// 添加评论
	public Journal addRevert(Revert revert) throws Exception {
		return journalService.addRevert(revert);
	}
	//删除评论
	public Boolean deleteRevert(Revert revert) throws Exception {
		return journalService.deleteRevert(revert);
	}

	// 得到日志主页类别
	public List<Category> getCategorys() throws Exception {
		return journalService.getCategorys();
	}

	// 查找日志数据
	public List<Journal> seletJournalByPage(Journal journal) throws Exception {
		return journalService.seletJournalByPage(journal);
	}

	// 查找回复
	public Journal queryRevertByPage(Revert revert) throws Exception {
		return journalService.queryRevert(revert);
	}

	// 查询日志
	public List<Category> queryCategory() throws Exception {
		return journalService.queryCategory();
	}

}
